<?php defined('KX_ROOT') || exit('Permission denied');?>﻿<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
    <title><?php include \Kuxin\View::parseTpl($tkd['title']);?></title>
    <meta name="keywords" content="<?php include \Kuxin\View::parseTpl($tkd['keywords']);?>">
    <meta name="description" content="<?php include \Kuxin\View::parseTpl($tkd['description']);?>">
    <meta name="author" content="www.ptcms.com">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width"/>
    <meta name="applicable-device" content="pc">
    <meta http-equiv="mobile-agent" content="format=html5; url=<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "mobileurl");?><?php echo $_SERVER['REQUEST_URI'];?>">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <meta http-equiv="Cache-Control" content="no-transform"/>
    <link rel="stylesheet" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxwebno3/css/xiaoshuo1.css"/>
</head>
<body>
<!-- 头部 -->
<div id="wrapper">
    <div id="wrapper">
    <div class="ywtop">
        <div class="ywtop_con">
            <div class="ywtop_sethome">
                <a onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "siteurl");?>');" href="#">将本站设为首页</a>
            </div>
            <div class="ywtop_addfavorite">
                <a href="javascript:window.external.addFavorite('<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "siteurl");?>','<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>')">收藏<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></a>
            </div>
            <?php if(($islogin)):?>
            <span class="color2 lh100"><span style="float: right"><a rel="nofollow" href="<?php echo \Kuxin\Helper\Url::build("user.mark.index",[],"");?>">我的书架</a>&nbsp;|&nbsp;<a href="<?php echo \Kuxin\Helper\Url::build("user.auth.logout",[],"");?>">退出登录</a></span><a  style="float: right;" href="<?php echo \Kuxin\Helper\Url::build("user.mark.index",[],"");?>" class="color2"><?php echo $userinfo['nickname']?:$userinfo['name'];?></a>
            <?php else:?>
            <div class="nri">
                <form name="mylogin" id="mylogin" method="post" action="<?php echo \Kuxin\Helper\Url::build("user.auth.login",[],"");?>">
                    <div class="cc">
                        <div class="txt">账号：</div>
                        <div class="inp"><input type="text" name="username" id="username"></div>
                    </div>
                    <div class="cc">
                        <div class="txt">密码：</div>
                        <div class="inp"><input type="password" name="password" id="password"></div>
                    </div>
                    <div class="frii"><input type="submit" class="int" value=" "></div>
                    <div class="ccc">
                        <div class="txtt"></div>
                        <div class="txtt"><a href="<?php echo \Kuxin\Helper\Url::build("user.auth.register",[],"");?>">用户注册</a></div>
                    </div>
                </form>
            </div>
            <?php endif;?>
        </div>
    </div>
    <div class="header">
        <div class="header_logo">
            <a href="index.html">笔趣阁</a>
        </div>
        <div class="header_search">
            <form action="<?php echo \Kuxin\Helper\Url::build("novel.search.result",[],"");?>">
                <div>
                    <input type="text" name="searchkey" placeholder="可搜书名和作者，请您少字也别输错字。" class="search"  id="txtKeyWord" value="<?php echo $_GET['searchkey'];?>" maxlength="30" title="请正确输入"/>
                    <input type="submit" class="searchBtn" value="搜索" title="搜索"/>
                </div>
            </form>
        </div>
        <div class="userpanel">
            <!-- Baidu Button BEGIN -->
            <div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare">
                <a class="bds_tsina" title="分享到新浪微博" href="#"></a>
                <a class="bds_renren" title="分享到人人网" href="#"></a>
                <span class="bds_more"></span>
                <a class="shareCount" href="#"></a>
            </div>
            <script type="text/javascript" id="bdshell_js"></script>
            <script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=0" src="http://bdimg.share.baidu.com/static/js/bds_s_v2.js?cdnversion=429866"></script>
            <script type="text/javascript">
                document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date() / 3600000)
            </script>
            <!-- Baidu Button END -->
        </div>
    </div>
    <div class="clear"></div>
    <div class="nav">
        <ul>
            <li><a href="<?php echo \Kuxin\Helper\Url::build("index.index",[],"");?>">首页</a></li>
            <li><a href="<?php echo \Kuxin\Helper\Url::build("novel.rank.index",[],"");?>">排行榜单</a></li>
            <li><a href="<?php echo \Kuxin\Helper\Url::build("novel.over.index",[],"");?>">完本小说</a></li>
            <?php $categorylist=\Kuxin\Block::show('category.list', ['pid'=>1,'withall'=>0]);?>
            <?php if(is_array($categorylist)): foreach($categorylist as $key =>$loop):?>
            <li><a title="<?php echo $loop['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.category.list",['categoryid'=>$loop['id'],'key'=>$loop['key']],"");?>"><?php echo $loop['name'];?></a></li>
            <?php endforeach; endif;?>
            <li><a rel="nofollow" href="<?php echo \Kuxin\Helper\Url::build("user.mark.index",[],"");?>">永久书架</a></li>
            <li><a rel="nofollow" href="<?php echo \Kuxin\Helper\Url::build("user.history.index",[],"");?>">阅读记录</a></li>
        </ul>
    </div>
</div>

    <div id="main">
        <div id="hotcontent">
            <!--站长推荐-->
            <div class="l">
                <?php $list=\Kuxin\Block::show('recommend', ['recommendid'=>2,'num'=>4]);?>
                <?php if(is_array($list)): foreach($list as $key =>$loop):?>
                <div class="item">
                    <div class="image">
                        <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['data']['novel']['id'],'pinyin'=>$loop['data']['novel']['pinyin']],"");?>">
                            <img src="<?php echo $loop['data']['novel']['cover'];?>" alt="<?php echo $loop['data']['novel']['name'];?>" width="120" height="150"/>
                        </a>
                    </div>
                    <dl>
                        <dt>
                            <span><?php echo $loop['data']['author']['name'];?></span>
                            <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['data']['novel']['id'],'pinyin'=>$loop['data']['novel']['pinyin']],"");?>"><?php echo $loop['data']['novel']['name'];?></a>
                        </dt>
                        <dd>
                            <?php echo \Kuxin\Helper\Str::truncate(showIntroLine($loop['data']['novel']['intro']),50);?>
                        </dd>
                    </dl>
                    <div class="clear"></div>
                </div>
                <?php endforeach; endif;?>
            </div>
            <!--新书推荐-->
            <div class="r">
                <h2>新书推荐</h2>
                <ul>
                    <?php $list=\Kuxin\Block::show('recommend', ['recommendid'=>1,'num'=>9]);?>
                    <?php if(is_array($list)): foreach($list as $key =>$loop):?>
                    <li>
                        <span class="s1"><a title="<?php echo $loop['data']['category']['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.category.list",['categoryid'=>$loop['data']['category']['id'],'key'=>$loop['data']['category']['key']],"");?>">[<?php echo $loop['data']['category']['name'];?>]</a></span>
                        <span class="s2"><a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['data']['novel']['id'],'pinyin'=>$loop['data']['novel']['pinyin']],"");?>" title="<?php echo $loop['data']['novel']['name'];?>"><?php echo $loop['data']['novel']['name'];?></a></span>
                        <span class="s5"><?php echo $loop['data']['author']['name'];?></span>
                    </li>
                    <?php endforeach; endif;?>
                </ul>
            </div>
            <div class="clear"></div>
        </div>
        <!--分类列表-->
        <?php $list=\Kuxin\Block::show('category.list', ['withall'=>0,'pid'=>1,'num'=>9]);?>
        <?php if(is_array($list) && (array()!=$list)): $ii=array(); $ii['loop']=array_slice($list,0,null,true); $ii['total']=count($list); $ii['count']=count($ii['loop']); $ii['cols']=1; $ii['add']=$ii['count']%1?1-$ii['count']%1:0; $ii['order']=0; $ii['row']=1;$ii['col']=0;foreach(array_pad($ii['loop'],$ii['add'],array()) as $ii['index']=>$ii['list']): $loop=$ii['list']; $ii['order']++; $ii['col']++; if($ii['col']==1): $ii['col']=0; $ii['row']++; endif; $ii['first']=$ii['order']==1; $ii['last']=$ii['order']==$ii['count']; $ii['extra']=$ii['order']>$ii['count'];?>
        <?php if($ii['index'] % 3 == 0):?>
        <div id="novelslist1" class="novelslist">
            <?php endif;?>
            <div class="content">
                <h2>
                    <a title="<?php echo $loop['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.category.list",['categoryid'=>$loop['id'],'key'=>$loop['key']],"");?>"><?php echo $loop['name'];?></a>
                </h2>
                <?php $novellist=\Kuxin\Block::show('novel.list', ['num'=>13,'category'=>$loop['id']]);?>
                <?php if(is_array($novellist) && (array()!=$novellist)): $i=array(); $i['loop']=array_slice($novellist,0,null,true); $i['total']=count($novellist); $i['count']=count($i['loop']); $i['cols']=1; $i['add']=$i['count']%1?1-$i['count']%1:0; $i['order']=0; $i['row']=1;$i['col']=0;foreach(array_pad($i['loop'],$i['add'],array()) as $i['index']=>$i['list']): $nlist=$i['list']; $i['order']++; $i['col']++; if($i['col']==1): $i['col']=0; $i['row']++; endif; $i['first']=$i['order']==1; $i['last']=$i['order']==$i['count']; $i['extra']=$i['order']>$i['count'];?>
                <?php if($i['first']):?>
                <div class="top">
                    <div class="image">
                        <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$nlist['novel']['id'],'pinyin'=>$nlist['novel']['pinyin']],"");?>" title="<?php echo $nlist['novel']['name'];?>"><img src="<?php echo $nlist['novel']['cover'];?>" alt="<?php echo $loop['data']['novel']['name'];?>" width="67" height="82"/></a></div>
                    <dl>
                        <dt>
                            <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$nlist['novel']['id'],'pinyin'=>$nlist['novel']['pinyin']],"");?>" title="<?php echo $nlist['novel']['name'];?>"><?php echo $nlist['novel']['name'];?></a>
                        </dt>
                        <dd>
                            <?php echo \Kuxin\Helper\Str::truncate(showIntroLine($nlist['novel']['intro']),"50");?>
                        </dd>
                    </dl>
                    <div class="clear"></div>
                </div>
                <ul>
                    <?php else:?>
                    <li>
                        <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$nlist['novel']['id'],'pinyin'=>$nlist['novel']['pinyin']],"");?>" title="<?php echo $nlist['novel']['name'];?>"><?php echo $nlist['novel']['name'];?></a>/<?php echo $nlist['author']['name'];?>
                    </li>
                    <?php endif;?>
                    <?php endforeach; endif;?>
                </ul>
            </div>
            <?php if($ii['index'] > 0 && $ii['index'] % 3 == 2):?>
            <div class="clear"></div>
        </div>
        <?php endif;?>
        <?php endforeach; endif;?>
        <div id="newscontent">
            <!--最新更新-->
            <div class="l">
                <h2> 最近更新小说列表</h2>
                <ul>
                    <?php $list=\Kuxin\Block::show('novel.list', ['order'=>'lastupdate','num'=>25,'cachetime'=>180]);?>
                    <?php if(is_array($list)): foreach($list as $key =>$loop):?>
                    <li>
                        <span class="s1"><a title="<?php echo $loop['category']['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.category.list",['categoryid'=>$loop['category']['id'],'key'=>$loop['category']['key']],"");?>"> [<?php echo $loop['category']['name'];?>] </a></span>
                        <span class="s2"><a title="<?php echo $loop['novel']['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>" target="_blank"><?php echo $loop['novel']['name'];?></a></span>
                        <span class="s3"><a title="<?php echo $loop['last']['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.chapter.read",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin'],'chapterid'=>$loop['last']['id']],"");?>" target="_blank"><?php echo $loop['last']['name'];?></a></span>
                        <span class="s4"><?php echo $loop['author']['name'];?></span>
                        <span class="s5"><?php echo \Kuxin\View::date($loop['last']['time'],"m-d H:i");?></span>
                    </li>
                    <?php endforeach; endif;?>
                </ul>
            </div>
            <!--最新入库-->
            <div class="r">
                <h2>热门小说</h2>
                <ul>
                    <?php $list=\Kuxin\Block::show('novel.list', ['order'=>'weekvisit','num'=>25]);?>
                    <?php if(is_array($list) && (array()!=$list)): $i=array(); $i['loop']=array_slice($list,0,null,true); $i['total']=count($list); $i['count']=count($i['loop']); $i['cols']=1; $i['add']=$i['count']%1?1-$i['count']%1:0; $i['order']=0; $i['row']=1;$i['col']=0;foreach(array_pad($i['loop'],$i['add'],array()) as $i['index']=>$i['list']): $loop=$i['list']; $i['order']++; $i['col']++; if($i['col']==1): $i['col']=0; $i['row']++; endif; $i['first']=$i['order']==1; $i['last']=$i['order']==$i['count']; $i['extra']=$i['order']>$i['count'];?>
                    <li>
                        <span class="s1"><a title="<?php echo $loop['category']['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.category.list",['categoryid'=>$loop['category']['id'],'key'=>$loop['category']['key']],"");?>"> [<?php echo $loop['category']['name'];?>] </a></span>
                        <span class="s2"><a class="color5" href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>" title="<?php echo $loop['novel']['name'];?>"><?php echo $loop['novel']['name'];?></a></span>
                        <span class="s5"><?php echo $loop['author']['name'];?></span>
                    </li>
                    <?php endforeach; endif;?>
                </ul>
            </div>
            <div class="clear">
            </div>
        </div>
    </div>
    <!--友情链接-->
    <div id="firendlink">
        友情连接：
        <?php $list=\Kuxin\Block::show('friendlink.list', []);?>
        <?php if(is_array($list)): foreach($list as $key =>$loop):?>
        <a href="<?php echo $loop['url'];?>" target="_blank" title="<?php echo $loop['name'];?><?php echo $loop['intro'];?>"><?php echo \Kuxin\View::default($loop['is_bold'],'','<strong>');?><?php echo $loop['name'];?><?php echo \Kuxin\View::default($loop['is_bold'],'','</strong>');?></a>
        <?php endforeach; endif;?>
    </div>
    <!--底部版权-->
    <div class="footer">
    <div class="footer_link">
    </div>
    <div class="footer_cont">
        <div class="color4 footer-info">本站内容系<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>根据您的指令搜索各大小说站得到的链接列表，不代表<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>赞成被搜索网站的内容或立场</div>
        <div class="color4 footer-info">如果版权人认为在本站放置您的作品有损您的利益，请发邮件至“<?php if(\Kuxin\Helper\Arr::getValue($_kxcms_config, "email")):?><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "email");?><?php else:?><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "qq");?>@qq.com<?php endif;?>”，本站确认后将会立即删除。</div>
        <div class="color4 footer-info">Copyright © 2009 - 2019 <a href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "siteurl");?>" target="_blank"><?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></a>. All Rights Reserved . 版权所有<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?></div>
    </div>
</div>
</body>
</html>